<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateKnowledgeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('knowledge', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('category')->nullable()->comment('分类 1 资源分享,2 案例分析,3 市场检测报告,4 人事制度,5 福利制度,6 顾问文档,7 行政制度,8 培训文档,9 公司介绍,10 入职培训,11 技能培训,12 经验分享');
            $table->unsignedInteger('assign')->nullable()->comment('归属者');
            $table->string('title')->nullable()->comment('标题');
            $table->text('content')->nullable()->comment('内容');
            $table->unsignedInteger('attachment')->nullable()->comment('合同附件');
            $table->tinyInteger('status')->default(1)->comment('状态：-1删除，0禁用，1启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('knowledge');
    }
}
